import axios from "axios";

export const httpClient = axios.create({
  timeout: 20 * 1000,
  baseURL: "http://localhost:3003",
  withCredentials: true,
});

httpClient.interceptors.response.use(
  (res) => {
    return res.data
  }, 
  (err) => {
    if(err.response.status === 403) return Promise.reject('你没有权限')
    throw err.response
  }
)
